import {lazy} from "react"
import {RouterList} from "../untils/index"

export let mainrouter:RouterList=[{
   path:"/index/earts",
   element:lazy(()=>import("../page/index/Earts")),
   title:"画图",
   icon:'UploadOutlined'
  },{
   path:"/index/home",
   element:lazy(()=>import("../page/index/Home")),
   title:"首页",
   icon:'VideoCameraOutlined'
  },{
   path:"/index/menu",
   element:lazy(()=>import("../page/index/Menu")),
   title:"菜单",
   icon:'NotificationOutlined'
  },{
   path:"/index/myuser",
   element:lazy(()=>import("../page/index/Myuser")),
   title:"用户管理",
   icon:'UserOutlined'
  }]
const routes:RouterList=[{
   path:"/index",
   element:lazy(()=>import("../page/Index")),
   children:mainrouter
},{
    path:"*",
    element:lazy(()=>import("../page/Error"))
 },{
    path:"/",
    to:"/index/home"
 },{
    path:"/login",
    element:lazy(()=>import("../page/Login"))
 },{
    path:"/deils/:id",
    element:lazy(()=>import("../page/Deils"))
 }]
export default routes